/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.aurelius.testngexecutionlogger.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 *
 * @author Lukasz
 */
@Entity
public class SimpleEntity implements Serializable {

    @Id
    private int id;

    private String name;

    public SimpleEntity() {
    }

    public SimpleEntity(int i, String cos) {
        id = i;
        name = cos;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final SimpleEntity other = (SimpleEntity) obj;
        if (this.id != other.id) {
            return false;
        }
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 31 * hash + this.id;
        hash = 31 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return "SimpleEntity{" + "id=" + id + ", name=" + name + '}';
    }


}
